using SmartParking.Server.Configuration;
using SmartParking.Server.EFContext;
using SmartParking.Server.IConfiguration;
using SmartParking.Server.IEFContext;
using SmartParking.Server.IService;
using SmartParking.Server.Service;

namespace SmartParking.Server.Start
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var builder = WebApplication.CreateBuilder(args);

            // Add services to the container.
            builder.Services.AddTransient<IConfiguration.IConfiguration, Configuration.Configuration>();
            builder.Services.AddTransient<IEFContext.IEFContext, EFContext.EFContext>();
            builder.Services.AddTransient<ILoginService, LoginService>();
            builder.Services.AddTransient<IMenuService, MenuService>();
            builder.Services.AddTransient<IUserService, UserService>();
            builder.Services.AddSingleton<IUtils, Utils>();

            builder.Services.AddControllers();

            var app = builder.Build();

            // Configure the HTTP request pipeline.

            app.UseAuthorization();


            app.MapControllers();

            app.Run();
        }
    }
}
